﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using WorkOne.Domain;
using WorkOne.Domain.Model;
using WorkOne.IRepository;

namespace WorkOne.Repository
{
    public class UserRepository : BaseRepository<User>, IUserRepository
    {
        public UserRepository(GoodsDbContext db) : base(db)
        {
        }

        public User Userlogin(string username, string password)
        {
            var user = db.users.FirstOrDefault(u => u.UserName == username && u.Password == password);
            return user ?? null;
        }
    }
}